import request from '@/utils/request'


export function getRoles(params) {
  return request({
    url: '/web/business/tbRole/page',
    method: 'get',
    params: params
  })
}

export function getRoleById(id) {
  return request({
    url: '/web/business/tbRole/page',
    method: 'get',
    params: id
  })
}

export function addRole(param) {
  return request({
    url: '/web/business/tbRole',
    method: 'post',
    data: param
  })
}

export async function updateRole(param) {
  return request({
    url: '/web/business/tbRole',
    method: 'put',
    data: param
  })
}

export function deleteRole(id) {
  return request({
    url: '/web/business/tbRole/'+id,
    method: 'delete'
  })
}

